#ifndef _STIAP_H
#define _STIAP_H
#ifdef D_ENABLE_REFLASH_MCU	
typedef enum
{
	CAN_IAP_INIT,
	CAN_IAP_COMFIRM,
	CAN_IAP_UNLOCK,
	CAN_IAP_ERASE_SECTOR2,
	CAN_IAP_ERASE_SECTOR1,
	CAN_IAP_DATA_RX,
	CAN_IAP_RESET
}CAN_IAP_STATE;


typedef enum
{
	EVT_IAP_NONE=0,
	EVT_FLASH_KEY_REQ       =0x2,
	EVT_FLASH_DATA_REQ      =0x3,
	EVT_FLASH_RESET_REQ     =0x4,

	EVT_IAP_CFM				=0xb0, 
	EVT_IAP_ULOCKKEY        =0xb1,
	EVT_IAP_DATA            =0xb2,
	EVT_IAP_DATA_END        =0xb3,
	EVT_IAP_RESET_READY     =0xb4
}IAP_EVT;


typedef enum
{
	_IAP_INIT=0,
	_IAP_COMFIRM,
	_IAP_KEY_REQ,
	_IAP_UNLOCK,
	_IAP_ERASE_SECTOR2,
	_IAP_ERASE_SECTOR1,
	_IAP_DATA_RX,
	_IAP_RESET
}_IAP_STATE;

extern void IAP_Pro(void);

#endif

#endif
